﻿// IService/IBiSupplierService.cs
using Model;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace IService
{
    public interface IBiSupplierService
    {
        /// <summary>
        /// 新增供应商（事务保护）
        /// </summary>
        Task<int> CreateAsync(BiSupplier data);

        /// <summary>
        /// 生成预览编号
        /// </summary>
        Task<string> GeneratePreviewCodeAsync();

        /// <summary>
        /// 简单新增（返回详细结果）
        /// </summary>
        Task<(bool success, string message)> SimpleCreateAsync(BiSupplier data);

        /// <summary>
        /// 根据ID查询
        /// </summary>
        Task<BiSupplier> GetByIdAsync(long id);

        /// <summary>
        /// 查询所有
        /// </summary>
        Task<List<BiSupplier>> GetAllAsync();

        /// <summary>
        /// 修改
        /// </summary>
        Task<int> UpdateAsync(BiSupplier data);

        /// <summary>
        /// 根据ID删除
        /// </summary>
        Task<int> DeleteAsync(long id);

        /// <summary>
        /// 导出选中供应商数据
        /// </summary>
        /// <param name="supplierIds">选中的供应商ID集合</param>
        /// <returns>Excel文件流</returns>
        Task<MemoryStream> ExportAsync(List<long> supplierIds);


    }

}